<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * @var $this \Magento\CatalogSearch\Block\Advanced\Result
 */
?>
<?php if($results = $this->getResultCount()): ?>
    <div class="search found">
        <?php if ($results == 1) : ?>
            <?php echo __('<strong>%1 item</strong> were found using the following search criteria', $results); ?>
        <?php else: ?>
            <?php echo __('<strong>%1 items</strong> were found using the following search criteria', $results); ?>
        <?php endif; ?>
    </div>
<?php else: ?>
    <div class="message error">
        <div>
            <?php echo __('No items were found using the following search criteria.');?> <a href="<?php echo $this->getFormUrl(); ?>"><?php echo __('Modify your search'); ?></a>
        </div>
    </div>
<?php endif; ?>

<?php $searchCriterias=$this->getSearchCriterias(); ?>
<div class="search summary">
    <?php foreach (array('left', 'right') as $side): ?>
        <?php if(@$searchCriterias[$side]): ?>
            <ul class="items">
                <?php foreach($searchCriterias[$side] as $criteria): ?>
                    <li class="item"><strong><?php echo $this->escapeHtml(__($criteria['name'])); ?>:</strong> <?php echo $this->escapeHtml($criteria['value']); ?></li>
                <?php endforeach; ?>
            </ul>
        <?php endif; ?>
    <?php endforeach; ?>
</div>
<?php if($this->getResultCount()): ?>
    <div class="message notice">
        <div>
            <?php echo __("Don't see what you're looking for?"); ?>
            <a href="<?php echo $this->getFormUrl(); ?>"><?php echo __('Modify your search'); ?></a>
        </div>
    </div>
<?php endif; ?>
<?php if($this->getResultCount()): ?>
    <div class="search results"><?php echo $this->getProductListHtml() ?></div>
<?php endif; ?>
<?php $this->getSearchCriterias(); ?>
